<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html{
            font-size: 20px;
        }
        @media (min-width:600px) {
            body{
                background-color: orange;
            }
            
        }
        @media (min-width:900px) {
            body{
                background-color: red;
        }
        }
        *{
            margin: 0;
            padding: 0;
        }
    ul{
        list-style: none;
        width: 100%;
        height: 2.5rem;
        background-color: aqua;
        display: flex;
        justify-content: space-around;
        align-items: center;
        font-size: 0.6rem;
    }
    
    </style>
</head>
<body>
    <ul class="list">
        <li><p>我是</p><p>首页</p></li>
        <li><p>我是</p><p>中页</p></li>
        <li><p>我是</p><p>尾页</p></li>
    </ul>
    <script>
        gu()
        window.onresize=gu;
       function gu(){
           var el=document.documentElement
           var vwidth=el.clientWidth
           el.style.fontSize=vwidth/375*20+"px"
        }
    </script>
</body>
</html>